class S2.UI.Accordion
Description
Applies "accordion menu" behavior to an element and its contents.
Options
multiple
(Boolean): Whether multiple panels can be open at once. Defaults tofalse
.headerSelector
(String): A CSS selector that identifies the child elements to use as accordion headers. Defaults to"h3"
.icons
(Object): The icons to use for each of the header states. Expects two properties —header
andheaderSelected
— and aString
for each. Defaults to{ header: 'ui-icon-triangle-1-e', headerSelected: 'ui-icon-triangle-1-s' }
.transition
(Function): A function that handles the transition effect when a panel is selected. Takes two arguments,panel
andpreviousPanel
, which reference the panel to be shown and the panel to be hidden, respectively. (When there is no panel to be hidden, thepreviousPanel
argument will benull
.) Defaults to a function that applies a "slide down"/"slide up" effect.